package com.ztgf.user.models.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;

import com.ztgf.common.dto.BaseDTO;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 用户登录表DTO
 *
 * @author zhanghualang
 * @Date 2020-05-28 17:42:53
 */
@Data
@TableName("user_login")
@ApiModel(value="用户登录表对象", description="用户登录表对象")
public class UserLoginDTO extends BaseDTO implements Serializable {
    @ApiModelProperty(value = "用户ID")
    private Long userId;
    @ApiModelProperty(value = "手机号")
    private String mobile;
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "密码")
    private String password;
    @ApiModelProperty(value = "密码盐")
    private String salt;
    @ApiModelProperty(value = "乐观锁")
    private Integer revision;
    @ApiModelProperty(value = "创建人")
    private Long createUserId;
    @ApiModelProperty(value = "更新人")
    private Long updateUserId;
    @ApiModelProperty(value = "验证剩余次数")
    private Integer verifyNum;
    @ApiModelProperty(value = "状态 0正常，1锁定")
    private Integer status;

    @ApiModelProperty("解锁时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")//gosn
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//输入字符串
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")//fastjson
    @TableField("unlock_time")
    protected Date unlockTime;
}